<table border="1px" width="100%" style="cursor:pointer;">
<?php
include 'dbInclude.php';
$data = $_GET["data"];
$rows=$dbh->query("SELECT * FROM `instrument_master` where INSTR_NAME like '%".$data."%';");

foreach ($rows as $row) {
echo "<tr class='clk' id='".$row["INSTR_ID"]."' ctr='".$row["INSTR_NAME"]."'><td>".$row["INSTR_NAME"]."</td></tr>";
}

?>
</table>
<script>
$(".clk").click(function(){
//alert("hi");
$("#cname").val($(this).attr("ctr"));
$("#fill").css("display","none");
$cid = $(this).attr("id");
//alert($cid);
$("#cid").val($cid);

//alert($("#cid").val());
});


</script>